package com.atguigu.gulimall.seckill.config;

import com.atguigu.gulimall.seckill.intercepter.LoginUserInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @ClassName SeckillWebConfig
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/8/3
 * @Version 1.0
 */
@Configuration
public class SeckillWebConfig implements WebMvcConfigurer{
    @Autowired
    LoginUserInterceptor loginUserInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(loginUserInterceptor).addPathPatterns("/**");
    }
}
